
//系统目录 / 药品剂型 接口相关的函数
import request from "../../untils/request.js"

/**
 * 
 *  post
 *  
 */

//新建挂号类别
export const insertRegisterCategory = (data) => {
    return request.post("/outpatient/insertRegisterCategory", data )
}

// 用于新建收費項目
export const addChargeProject = (data) => {
    return request.post("/outpatient/addChargeProject", data )
}

//修改挂号类别
export const updateRegisterCategory = (data) => {
    return request.post("/outpatient/updateRegisterCategory", data )
}

// 更新收費項目
export const updateChargeProject = (data) => {
    return request.post("/outpatient/updateChargeProject", data )
}

/**
 * 
 * get 
 *  
 */

// 收费项目列表

export const getCostList = (params) => {
    return request.get("/outpatient/getCostList", { params })
}
// 树菜单 新建收費項目，费用类别
export const getCostType = (params) => {
    return request.get("/outpatient/getCostType", { params })
}

// 新建收費項目，病案費別
export const getMREC = (params) => {
    return request.get("/outpatient/getMREC", { params })
}

// 新建收費項目，财务分类接口
export const getSosTypes = (params) => {
    return request.get("/outpatient/getSosTypes", { params })
}

// 标准项目列表
export const standardList = (params) => {
    return request.get("/outpatient/costnametable/standardList", { params })
}

// 获取挂号类别列表，带分页查询
export const docregistertype = (params) => {
    return request.get("/outpatient/registertype/page", { params })
}

// 获取挂号类别列表，带分页查询
// export const getRegisterType = (params) => {
//     return request.get("/outpatient/getRegisterType", { params })
// }

// 删除挂号类别
export const deleteRegisterCategory = (data) => {
  return request.delete("/outpatient/deleteRegisterCategory", { data })
}

// 删除单条收费项目
export const deleteByItemId = (params) => {
    return request.get("/outpatient/deleteByItemId", { params })
}

//查询项目价格
export const getChargingPrice = (params) => {
    return request.get("/outpatient/costnametable/list", { params })
}

// 获取字典数据
export const dict = (params) => {
    return request.get("/outpatient/index/dict", { params } )
}

//添加挂号类别
export const addCategoryData = (data) => {
    return request.post("/outpatient/registertype", data)
}

//修改挂号类别
export const editCategoryData = (data) => {
    return request.put("/outpatient/registertype", data)
}

// 获取挂号类别单个参数
export const getCategory = (params) => {
    return request.get("/outpatient/registertype/get", {params})
}


/*
 * 
 * DELETE 
 *   
 */   


// 暴露
export default{
	getCostType,getMREC,getSosTypes,standardList,getCostList,
	addChargeProject,updateChargeProject,
	docregistertype,insertRegisterCategory,updateRegisterCategory,
    deleteRegisterCategory,deleteByItemId,dict,addCategoryData,getCategory
}